package cn.skcks.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class HelloController {

	@RequestMapping(value = "/hello",method = RequestMethod.GET)
	public String hello(Model model){
		// 封装数据, 可以在 jsp 页面中取出并渲染
		model.addAttribute("msg","hello");

		// 会被视图解析器处理
		return "hello";
	}
}